﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;

namespace ConsoleTest1
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var db = new LicentaEntities())
            {
                //var u = db.Users.Where(p => p.ID == 1).First();
                //u.Username = "wwwwww";
                User u = new User { ID = 1 };
                //db.Users.Add(u);
                //db.Users.Attach(u);
                db.Users.Attach(u);
                db.Entry(u).State = System.Data.EntityState.Deleted;

                db.SaveChanges();
                Console.ReadKey();

            }
        }
    }
}
